package xyz.ddlnt.serviceusr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import xyz.ddlnt.model.dto.NoteDirDTO;
import xyz.ddlnt.model.entity.Note;
import xyz.ddlnt.model.vo.NoteVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/6 21:52
 */
@Mapper
public interface NoteMapper extends BaseMapper<Note> {

    @Select("select id, note_title, type, layer, dir_prev_node_id, dir_child_nodes, prev_node_id,  prev_node_type," +
            " publish_status, post_id, create_time, update_time from note where user_id = #{userId} and dir_prev_node_id=#{dirPrevNodeId}")
    List<Note> getNoteVOS(NoteDirDTO noteDirDTO);

}
